' IBDim2.iBas

' IBDim2 is a simple application
' to show how to deal with 2
' dimensions arrays in iziBasic, 
' like Array(10,5), when iziBasic
' "only" offers access to the A(n)
' array (1 dimension).

{CREATORID "LDTE"}
{VERSION "1.0"}
{PARSER ON}

{INCLUDE "Dim2.iBas"}

BEGIN
'Store some values in A(10,5)
 FOR I=1 TO 10
  FOR J=1 TO 5
   V=(RND(I)+1)*(RND(J)+1)
   GOSUB _PutInArray 'A(I,J)=V
  NEXT
 NEXT
'Retrieve and show values in A(10,5)
 FOR I=1 TO 10
  FOR J=1 TO 5
   GOSUB _GetFromArray 'V=A(I,J)
   PRINT V USING 0;
   PRINT " ";
  NEXT
  PRINT
 NEXT
 WAIT
END

